{extends file="../home.html"}
{block name="title"}{$head_title}{/block}
{block name="css"}
 	<link rel="stylesheet" style="text/css" href="__PUBLIC__/Css/front/front_css/login_regist.css?version={$version}"> 
{/block}
{block name="content"}
	<div class="service_header">
	    <i class="icon icon_back_default3x" style="top:.7rem"></i>
	    <span>返回</span>
	    <p>注册</p>
	</div>
	<form class="form-regist" method="post">
		<div class="formitems">
			<label class="icon_five icon_shouji_default3x" for="phone"></label>
			<span class="v-line"></span>
			<input type="number" name="phone" id="phone" placeholder="手机号码" class="item-cont" />
		</div>
		<div class="formitems">
			<label class="icon_five icon_yanzhegnma_default3x" for="code"></label>
			<span class="v-line"></span>
			<input type="number" name="code" id="code" placeholder="验证码" class="item-cont" />
			<input type="button" value="发送验证码" class="code-btn" />
		</div>
		<div class="formitems border-no">
			<label class="icon_five icon_mima_default3x" for="psd"></label>
			<span class="v-line"></span>
			<input type="password" name="psd" id="psd" placeholder="请输入密码" class="item-cont" />
			<i class="icon_five icon_yanjing_default3x eye"></i>
		</div>
	</form>
	<a href="javascript:void(0);" class="regist-btn">注册</a>
	<p class="hint-info">
		<span>点击【注册】代表你已阅读并同意</span>
		<a href="javascript:void(0)">用户使用协议</a>
	</p>
{/block}
{block name="js"}
{literal}
	<script type="text/javascript" src="/Public/Js/front/front_js/ajaxupload.3.5.js"></script>
	<script type="text/javascript">
		$(".service_header i,.service_header span").on("click",function(){
            history.go(-1);
        });
        //点击发送验证码按钮
        $(".code-btn").on("click",function(){
        	if($("#phone").val()==''){
                layer.open({
                    content: '请输入手机号码',
                    title: false,
                    btn: ['确定'],
                });
                return;
            }
        	//按钮禁用
        	$(".code-btn").attr("disabled",true);
        	$(".code-btn").val("10s后再获取");
        	var sec = 10;
        	var timer = setInterval(function(){
        		sec--;
        		if(sec==0){
        			sec = 10;
        			$(".code-btn").val("发送验证码");
        			$(".code-btn").removeAttr("disabled");
        			clearInterval(timer);
        		}else{
        			$(".code-btn").val(sec+"s后再获取");
        		}
        		
        	},1000);
        });
        //点击眼睛图标
        $(".border-no .eye").on("click",function(){
        	$(this).toggleClass("icon_yanjing_default3x").toggleClass("icon_yanjing_selected3x");
        	$(".border-no .icon_yanjing_default3x").siblings("input").attr("type","password");
        	$(".border-no .icon_yanjing_selected3x").siblings("input").attr("type","text");
        });
        //点击注册按钮
        $(".regist-btn").on("click",function(){
        	if($("#phone").val()==''){
                layer.open({
                    content: '请输入手机号码',
                    title: false,
                    btn: ['确定'],
                });
                return;
            }
        	if($("#code").val()==''){
                layer.open({
                    content: '请输入验证码',
                    title: false,
                    btn: ['确定'],
                });
                return;
            }
        	if($("#psd").val()==''){
                layer.open({
                    content: '请输入密码',
                    title: false,
                    btn: ['确定'],
                });
                return;
            }
        });
	</script>
{/literal}
{/block}
